package com.dynamixsoftware.printershare;

import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.ContentResolver;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Picture;
import android.graphics.Rect;
import android.graphics.RectF;
import android.net.Uri;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import com.dynamixsoftware.printershare.data.Paper;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.RandomAccessFile;
import java.lang.reflect.Field;
import java.util.Vector;

public class ActivityPrintPDF
  extends ActivityPrint
{
  private static volatile boolean lib_loaded = false;
  public static final String render_lib = "libpdfrenderJNI.so";
  public static final String render_pkg = "lib_pdfrender";
  public static final String render_ver = "3.5.5";
  private File pdf_file = null;
  private Vector<PdfPicture> pdf_pages;
  private String pdf_password = null;
  private CharSequence[] printSizeOptions;
  private int print_size = 2;
  private int sel_print_size;
  private File tf_in = new File(App.getTempDir(), "printershare_pdf.tmp");
  private File tf_out = new File(App.getTempDir(), "printershare_out.tmp");
  private Thread ut;
  private Thread wt;
  
  private boolean checkRender()
    throws Exception
  {
    if (!"3.5.5".equals(this.prefs.getString("lib_pdfrender", ""))) {}
    int i;
    do
    {
      File localFile2;
      do
      {
        return false;
        File localFile1 = App.getFilesDirInt("lib_pdfrender");
        if (lib_loaded) {
          break;
        }
        localFile2 = new File(localFile1, "libpdfrenderJNI.so");
      } while (!localFile2.exists());
      System.load(localFile2.getAbsolutePath());
      lib_loaded = true;
      i = PDFrender.create(null, null, App.getFilesDirExt("lib_pdfrender").getAbsolutePath(), App.getTempDir().getAbsolutePath());
      if (i == 0) {
        return true;
      }
    } while (i == 100);
    throw new RenderError(i);
  }
  
  protected void createPages()
  {
    this.pages = new Vector();
    for (int i = 0; i < this.pdf_pages.size(); i++) {
      this.pages.add(new ActivityPrint.Page((Picture)this.pdf_pages.get(i))
      {
        public Picture getPicture()
        {
          ActivityPrintPDF.PdfPicture localPdfPicture = (ActivityPrintPDF.PdfPicture)super.getPicture();
          PDFrender.drawPage(ActivityPrintPDF.PdfPicture.access$300(localPdfPicture), 0);
          return localPdfPicture;
        }
      });
    }
  }
  
  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    CharSequence[] arrayOfCharSequence = new CharSequence[3];
    arrayOfCharSequence[0] = getResources().getString(2131099795);
    arrayOfCharSequence[1] = getResources().getString(2131099796);
    arrayOfCharSequence[2] = getResources().getString(2131099797);
    this.printSizeOptions = arrayOfCharSequence;
    this.print_size = this.prefs.getInt(getActivityClassName() + "#print_size", this.print_size);
  }
  
  public void onCreateContextMenu(ContextMenu paramContextMenu, View paramView, ContextMenu.ContextMenuInfo paramContextMenuInfo)
  {
    paramContextMenu.setHeaderTitle(2131099789);
    paramContextMenu.add(0, 100, 0, 2131099794);
    paramContextMenu.add(0, 21, 0, 2131099804);
    paramContextMenu.add(0, 22, 0, 2131099805);
    paramContextMenu.add(0, 10, 0, 2131099806);
    paramContextMenu.add(0, 11, 0, 2131099807);
    paramContextMenu.add(0, 12, 0, 2131099651);
  }
  
  public void onDestroy()
  {
    super.onDestroy();
    if (lib_loaded) {
      PDFrender.destroy();
    }
    if (this.tf_in.exists()) {
      this.tf_in.delete();
    }
    if (this.tf_out.exists()) {
      this.tf_out.delete();
    }
  }
  
  public boolean onMenuItemSelected(int paramInt, MenuItem paramMenuItem)
  {
    switch (paramMenuItem.getItemId())
    {
    default: 
      return super.onMenuItemSelected(paramInt, paramMenuItem);
    }
    new AlertDialog.Builder(this).setTitle(2131099794).setPositiveButton(2131099703, new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
      {
        ActivityPrintPDF.access$002(ActivityPrintPDF.this, ActivityPrintPDF.this.sel_print_size);
        SharedPreferences.Editor localEditor = ActivityPrintPDF.this.prefs.edit();
        localEditor.putInt(ActivityPrintPDF.this.getActivityClassName() + "#print_size", ActivityPrintPDF.this.print_size);
        localEditor.commit();
        ActivityPrintPDF.this.need_update_pages = true;
        ActivityPrintPDF.this.update();
      }
    }).setNegativeButton(2131099707, null).setSingleChoiceItems(this.printSizeOptions, this.print_size, new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt)
      {
        ActivityPrintPDF.access$102(ActivityPrintPDF.this, paramAnonymousInt);
      }
    }).show();
    return true;
  }
  
  protected void showPreview(final ActivityPrint.Page paramPage)
  {
    showProgress(getResources().getString(2131099746));
    this.ut = new Thread()
    {
      public void run()
      {
        ActivityPrint.pp = paramPage.getPicture();
        Intent localIntent = new Intent();
        localIntent.setClass(ActivityPrintPDF.this, ActivityPreview.class);
        ActivityPrintPDF.this.startActivityForResult(localIntent, 10);
        ActivityPrintPDF.this.runOnUiThread(new Runnable()
        {
          public void run()
          {
            ActivityPrintPDF.this.hideProgress();
          }
        });
        ActivityPrintPDF.access$202(ActivityPrintPDF.this, null);
      }
    };
    this.ut.start();
  }
  
  protected void update()
  {
    if (this.pdf_pages == null)
    {
      this.pdf_pages = new Vector();
      this.need_update_pages = false;
      this.wt = new CheckRenderThread(Boolean.valueOf(true));
      this.wt.start();
    }
    super.update();
  }
  
  class CheckRenderThread
    extends Thread
  {
    private Boolean first_check;
    
    public CheckRenderThread(Boolean paramBoolean)
    {
      this.first_check = paramBoolean;
    }
    
    public void run()
    {
      ActivityPrintPDF.this.runOnUiThread(new Runnable()
      {
        public void run()
        {
          ActivityPrintPDF.this.showProgress(ActivityPrintPDF.this.getResources().getString(2131099746));
        }
      });
      int i;
      if (this.first_check == null)
      {
        i = 1;
        if (i != 0) {
          break label120;
        }
        if (this.first_check.booleanValue() != true) {
          break label93;
        }
        ActivityPrintPDF.this.runOnUiThread(new Runnable()
        {
          public void run()
          {
            ActivityPrintPDF.this.hideProgress();
            if (!ActivityPrintPDF.this.isFinishing()) {
              new AlertDialog.Builder(ActivityPrintPDF.this).setIcon(17301543).setTitle(2131099857).setMessage(2131099859).setPositiveButton(2131099705, new DialogInterface.OnClickListener()
              {
                public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int)
                {
                  ActivityPrintPDF.access$802(ActivityPrintPDF.this, new ActivityPrintPDF.InstallRenderThread(ActivityPrintPDF.this));
                  ActivityPrintPDF.this.wt.start();
                }
              }).setNegativeButton(2131099706, new DialogInterface.OnClickListener()
              {
                public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int) {}
              }).show();
            }
          }
        });
      }
      for (;;)
      {
        for (;;)
        {
          ActivityPrintPDF.access$802(ActivityPrintPDF.this, null);
          return;
          try
          {
            boolean bool = ActivityPrintPDF.this.checkRender();
            i = bool;
          }
          catch (Throwable localThrowable)
          {
            localThrowable.printStackTrace();
            App.reportThrowable(localThrowable);
            i = 0;
          }
        }
        break;
        label93:
        ActivityPrintPDF.this.last_error = "Cannot install PDF Render library. An unknown error has occurred.";
        ActivityPrintPDF.this.runOnUiThread(new Runnable()
        {
          public void run()
          {
            ActivityPrintPDF.this.hideProgress();
            ActivityPrintPDF.this.displayLastError(new DialogInterface.OnClickListener()
            {
              public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int) {}
            });
          }
        });
      }
      label120:
      ActivityPrintPDF.access$802(ActivityPrintPDF.this, new ActivityPrintPDF.ConvertPagesThread(ActivityPrintPDF.this));
      ActivityPrintPDF.this.wt.start();
    }
  }
  
  class ConvertPagesThread
    extends Thread
  {
    ConvertPagesThread() {}
    
    public void run()
    {
      ActivityPrintPDF localActivityPrintPDF1 = ActivityPrintPDF.this;
      Runnable local1 = new Runnable()
      {
        public void run()
        {
          ActivityPrintPDF.this.showProgress(ActivityPrintPDF.this.getResources().getString(2131099746));
        }
      };
      localActivityPrintPDF1.runOnUiThread(local1);
      ActivityPrintPDF.this.last_error = null;
      int i2;
      InputStream localInputStream;
      FileOutputStream localFileOutputStream;
      for (;;)
      {
        Intent localIntent;
        try
        {
          if (ActivityPrintPDF.this.pdf_file != null) {
            break label427;
          }
          localIntent = ActivityPrintPDF.this.getIntent();
          if (!"android.intent.action.SEND".equals(localIntent.getAction())) {
            break label407;
          }
          localUri = (Uri)localIntent.getExtras().get("android.intent.extra.STREAM");
          String str1 = localUri.toString();
          if (str1.indexOf("file:/") >= 0) {
            break label752;
          }
          i2 = str1.indexOf(App.ext_storage_root);
          if (i2 >= 0)
          {
            String str2 = str1.substring(i2);
            int i3 = str2.indexOf("?");
            if (i3 >= 0) {
              str2 = str2.substring(0, i3);
            }
            int i4 = str2.indexOf("#");
            if (i4 >= 0) {
              str2 = str2.substring(0, i4);
            }
            ActivityPrintPDF localActivityPrintPDF5 = ActivityPrintPDF.this;
            File localFile = new File(str2);
            ActivityPrintPDF.access$402(localActivityPrintPDF5, localFile);
            if ((!ActivityPrintPDF.this.pdf_file.isFile()) || (!ActivityPrintPDF.this.pdf_file.exists()) || (!ActivityPrintPDF.this.pdf_file.canRead())) {
              ActivityPrintPDF.access$402(ActivityPrintPDF.this, null);
            }
          }
          if (ActivityPrintPDF.this.pdf_file != null) {
            break label427;
          }
          ActivityPrintPDF.access$402(ActivityPrintPDF.this, ActivityPrintPDF.this.tf_in);
          localInputStream = ActivityPrintPDF.this.getContentResolver().openInputStream(localUri);
          localFileOutputStream = new FileOutputStream(ActivityPrintPDF.this.pdf_file);
          byte[] arrayOfByte = new byte[4096];
          int i5 = localInputStream.read(arrayOfByte);
          if (i5 == -1) {
            break;
          }
          localFileOutputStream.write(arrayOfByte, 0, i5);
          continue;
          if (ActivityPrintPDF.this.last_error != null) {
            break label726;
          }
        }
        catch (Exception localException)
        {
          localException.printStackTrace();
          ActivityPrintPDF.this.last_error = ("Internal Error: " + localException.getMessage());
          App.reportThrowable(localException);
        }
        label364:
        ActivityPrintPDF localActivityPrintPDF3 = ActivityPrintPDF.this;
        Runnable local3 = new Runnable()
        {
          public void run()
          {
            ActivityPrintPDF.this.need_update_pages = true;
            ActivityPrintPDF.this.update();
          }
        };
        localActivityPrintPDF3.runOnUiThread(local3);
        label397:
        ActivityPrintPDF.access$802(ActivityPrintPDF.this, null);
        return;
        label407:
        Uri localUri = localIntent.getData();
      }
      localFileOutputStream.close();
      localInputStream.close();
      label427:
      ActivityPrintPDF.this.pdf_pages.clear();
      int i = PDFrender.create(ActivityPrintPDF.this.pdf_file.getAbsolutePath(), ActivityPrintPDF.this.pdf_password, App.getFilesDirExt("lib_pdfrender").getAbsolutePath(), App.getTempDir().getAbsolutePath());
      if (i == 4)
      {
        ActivityPrintPDF localActivityPrintPDF4 = ActivityPrintPDF.this;
        Runnable local2 = new Runnable()
        {
          public void run()
          {
            ActivityPrintPDF.this.hideProgress();
            LayoutInflater localLayoutInflater = LayoutInflater.from(ActivityPrintPDF.this);
            ActivityPrintPDF.this.view_dialog_authorization = localLayoutInflater.inflate(2130903045, null);
            ActivityPrintPDF.this.view_dialog_authorization.findViewById(2131230738).setVisibility(8);
            ActivityPrintPDF.this.view_dialog_authorization.findViewById(2131230739).setVisibility(8);
            new AlertDialog.Builder(ActivityPrintPDF.this).setIcon(17301543).setTitle(2131099762).setView(ActivityPrintPDF.this.view_dialog_authorization).setCancelable(false).setPositiveButton(2131099703, new DialogInterface.OnClickListener()
            {
              public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int)
              {
                EditText localEditText = (EditText)ActivityPrintPDF.this.view_dialog_authorization.findViewById(2131230741);
                ActivityPrintPDF.access$702(ActivityPrintPDF.this, localEditText.getText().toString());
                ActivityPrintPDF.access$802(ActivityPrintPDF.this, new ActivityPrintPDF.ConvertPagesThread(ActivityPrintPDF.this));
                ActivityPrintPDF.this.wt.start();
              }
            }).setNegativeButton(2131099707, new DialogInterface.OnClickListener()
            {
              public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int) {}
            }).create().show();
          }
        };
        localActivityPrintPDF4.runOnUiThread(local2);
        ActivityPrintPDF.access$802(ActivityPrintPDF.this, null);
        return;
      }
      if (i != 0)
      {
        ActivityPrintPDF.RenderError localRenderError = new ActivityPrintPDF.RenderError(i);
        throw localRenderError;
      }
      int j = PDFrender.getPageCount();
      int k = 0;
      label539:
      int m;
      int n;
      if (k < j)
      {
        double[] arrayOfDouble = PDFrender.getPageSize(k + 1);
        m = (int)(100.0D * arrayOfDouble[0] / 72.0D);
        n = (int)(100.0D * arrayOfDouble[1] / 72.0D);
        if ((arrayOfDouble[2] > 0.0D) && (arrayOfDouble[2] < arrayOfDouble[0])) {
          m = (int)(100.0D * arrayOfDouble[2] / 72.0D);
        }
        if ((arrayOfDouble[3] > 0.0D) && (arrayOfDouble[3] < arrayOfDouble[1])) {
          n = (int)(100.0D * arrayOfDouble[3] / 72.0D);
        }
        if ((arrayOfDouble[4] == 90.0D) || (arrayOfDouble[4] == 270.0D)) {
          break label758;
        }
      }
      for (;;)
      {
        Vector localVector = ActivityPrintPDF.this.pdf_pages;
        ActivityPrintPDF.PdfPicture localPdfPicture = new ActivityPrintPDF.PdfPicture(ActivityPrintPDF.this, k + 1, m, n);
        localVector.add(localPdfPicture);
        k++;
        break label539;
        break label364;
        label726:
        ActivityPrintPDF localActivityPrintPDF2 = ActivityPrintPDF.this;
        Runnable local4 = new Runnable()
        {
          public void run()
          {
            ActivityPrintPDF.this.hideProgress();
            ActivityPrintPDF.this.displayLastError(new DialogInterface.OnClickListener()
            {
              public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int) {}
            });
          }
        };
        localActivityPrintPDF2.runOnUiThread(local4);
        break label397;
        label752:
        i2 = 5;
        break;
        label758:
        int i1 = m;
        m = n;
        n = i1;
      }
    }
  }
  
  class InstallRenderThread
    extends Thread
  {
    InstallRenderThread() {}
    
    public void run()
    {
      ActivityPrintPDF.this.runOnUiThread(new Runnable()
      {
        public void run()
        {
          ActivityPrintPDF.this.showProgress(ActivityPrintPDF.this.getResources().getString(2131099746));
        }
      });
      ActivityPrintPDF.this.last_error = null;
      for (;;)
      {
        try
        {
          ActivityPrintPDF.this.installDrvLibPack("lib_pdfrender|3.5.5|libpdfrenderJNI.so");
          if ((!new File("/system/lib/libskia.so").exists()) && (new File("/system/lib/libsgl.so").exists()))
          {
            File localFile3 = new File(App.getFilesDirInt("lib_pdfrender"), "libpdfrenderJNI.so");
            BufferedInputStream localBufferedInputStream3 = new BufferedInputStream(new FileInputStream(localFile3), 4096);
            byte[] arrayOfByte3 = { 108, 105, 98, 115, 107, 105, 97, 46, 115, 111 };
            i5 = 0;
            i6 = 0;
            i7 = -1;
            int i8 = localBufferedInputStream3.read();
            if (i8 != -1)
            {
              if (arrayOfByte3[i5] != i8) {
                continue;
              }
              if (i5 == 0) {
                i7 = i6;
              }
              i5++;
              if (i5 != arrayOfByte3.length) {
                continue;
              }
            }
            localBufferedInputStream3.close();
            if (i7 != -1)
            {
              RandomAccessFile localRandomAccessFile3 = new RandomAccessFile(localFile3, "rw");
              localRandomAccessFile3.seek(i7 + 4);
              localRandomAccessFile3.write(new byte[] { 103, 108, 46, 115, 111, 0 });
              localRandomAccessFile3.close();
            }
          }
          int i = Integer.parseInt(Build.VERSION.SDK);
          if (i < 16)
          {
            File localFile1 = new File(App.getFilesDirInt("lib_pdfrender"), "libpdfrenderJNI.so");
            BufferedInputStream localBufferedInputStream1 = new BufferedInputStream(new FileInputStream(localFile1), 4096);
            byte[] arrayOfByte1 = "_ZN15SkPictureRecord8clipPathERK6SkPathN8SkRegion2OpEb".getBytes();
            j = 0;
            k = 0;
            m = -1;
            int n = localBufferedInputStream1.read();
            if (n != -1)
            {
              if (arrayOfByte1[j] != n) {
                continue;
              }
              if (j == 0) {
                m = k;
              }
              j++;
              if (j != arrayOfByte1.length) {
                continue;
              }
            }
            localBufferedInputStream1.close();
            if (m != -1)
            {
              RandomAccessFile localRandomAccessFile1 = new RandomAccessFile(localFile1, "rw");
              localRandomAccessFile1.seek(-1 + (m + arrayOfByte1.length));
              localRandomAccessFile1.write(0);
              localRandomAccessFile1.close();
            }
          }
          if (i > 18)
          {
            File localFile2 = new File(App.getFilesDirInt("lib_pdfrender"), "libpdfrenderJNI.so");
            BufferedInputStream localBufferedInputStream2 = new BufferedInputStream(new FileInputStream(localFile2), 4096);
            byte[] arrayOfByte2 = "_ZN8SkBitmap9setConfigENS_6ConfigEiii".getBytes();
            i1 = 0;
            i2 = 0;
            i3 = -1;
            int i4 = localBufferedInputStream2.read();
            if (i4 != -1)
            {
              if (arrayOfByte2[i1] != i4) {
                continue;
              }
              if (i1 == 0) {
                i3 = i2;
              }
              i1++;
              if (i1 != arrayOfByte2.length) {
                continue;
              }
            }
            localBufferedInputStream2.close();
            if (i3 != -1)
            {
              RandomAccessFile localRandomAccessFile2 = new RandomAccessFile(localFile2, "rw");
              localRandomAccessFile2.seek(-1 + (i3 + arrayOfByte2.length));
              localRandomAccessFile2.write(106);
              localRandomAccessFile2.close();
            }
          }
        }
        catch (Exception localException)
        {
          int i5;
          int i6;
          int i7;
          int j;
          int k;
          int m;
          int i1;
          int i2;
          int i3;
          localException.printStackTrace();
          ActivityPrintPDF.this.last_error = ("Internal Error: " + localException.getMessage());
          App.reportThrowable(localException);
          continue;
          ActivityPrintPDF.this.runOnUiThread(new Runnable()
          {
            public void run()
            {
              ActivityPrintPDF.this.hideProgress();
              ActivityPrintPDF.this.displayLastError(new DialogInterface.OnClickListener()
              {
                public void onClick(DialogInterface paramAnonymous2DialogInterface, int paramAnonymous2Int) {}
              });
            }
          });
          continue;
        }
        if (ActivityPrintPDF.this.last_error != null) {
          continue;
        }
        ActivityPrintPDF.this.runOnUiThread(new Runnable()
        {
          public void run()
          {
            ActivityPrintPDF.access$802(ActivityPrintPDF.this, new ActivityPrintPDF.CheckRenderThread(ActivityPrintPDF.this, Boolean.valueOf(false)));
            ActivityPrintPDF.this.wt.start();
          }
        });
        ActivityPrintPDF.access$802(ActivityPrintPDF.this, null);
        return;
        i5 = 0;
        i7 = -1;
        i6++;
        continue;
        j = 0;
        m = -1;
        k++;
        continue;
        i1 = 0;
        i3 = -1;
        i2++;
      }
    }
  }
  
  class PdfPicture
    extends Picture
  {
    private static final int IDPI = 150;
    private int height;
    private boolean landscape;
    private int num;
    private int width;
    
    public PdfPicture(int paramInt1, int paramInt2, int paramInt3)
    {
      this.num = paramInt1;
      this.width = paramInt2;
      this.height = paramInt3;
      if (paramInt2 > paramInt3) {}
      for (boolean bool = true;; bool = false)
      {
        this.landscape = bool;
        return;
      }
    }
    
    public void draw(Canvas paramCanvas)
    {
      paramCanvas.save();
      for (;;)
      {
        RectF localRectF1;
        try
        {
          paramCanvas.drawColor(-1);
          int i = 150 * ActivityPrintPDF.this.paper.width / 254;
          int j = 150 * ActivityPrintPDF.this.paper.height / 254;
          if (ActivityPrintPDF.this.print_size == 2)
          {
            i = 150 * ActivityPrintPDF.this.paper.image_area.width() / 254;
            j = 150 * ActivityPrintPDF.this.paper.image_area.height() / 254;
          }
          if (this.landscape)
          {
            int k = i;
            i = j;
            j = k;
          }
          int m = this.width;
          int n = this.height;
          if (ActivityPrintPDF.this.print_size == 2)
          {
            if (!this.landscape) {
              continue;
            }
            paramCanvas.translate(150 * ActivityPrintPDF.this.paper.image_area.top / 254, 150 * (ActivityPrintPDF.this.paper.width - ActivityPrintPDF.this.paper.image_area.width() - ActivityPrintPDF.this.paper.image_area.left) / 254);
          }
          if (ActivityPrintPDF.this.print_size > 0)
          {
            localRectF1 = new RectF(0.0F, 0.0F, i, n * i / m);
            RectF localRectF2 = new RectF(0.0F, 0.0F, m * j / n, j);
            if (localRectF1.height() <= j) {
              break label454;
            }
            localRectF3 = localRectF2;
            paramCanvas.scale(localRectF3.width() / m, localRectF3.height() / n);
          }
          Field localField = Canvas.class.getDeclaredField("mNativeCanvas");
          localField.setAccessible(true);
          PDFrender.drawPage(this.num, localField.getInt(paramCanvas));
        }
        catch (Throwable localThrowable)
        {
          localThrowable.printStackTrace();
          App.reportThrowable(localThrowable);
          continue;
        }
        finally
        {
          paramCanvas.restore();
        }
        paramCanvas.restore();
        return;
        paramCanvas.translate(150 * ActivityPrintPDF.this.paper.image_area.left / 254, 150 * (ActivityPrintPDF.this.paper.height - ActivityPrintPDF.this.paper.image_area.height() - ActivityPrintPDF.this.paper.image_area.top) / 254);
        continue;
        label454:
        RectF localRectF3 = localRectF1;
      }
    }
    
    public int getHeight()
    {
      if (this.landscape) {
        return 150 * ActivityPrintPDF.this.paper.width / 254;
      }
      return 150 * ActivityPrintPDF.this.paper.height / 254;
    }
    
    public int getWidth()
    {
      if (this.landscape) {
        return 150 * ActivityPrintPDF.this.paper.height / 254;
      }
      return 150 * ActivityPrintPDF.this.paper.width / 254;
    }
  }
  
  static class RenderError
    extends Exception
  {
    public int err_no;
    
    public RenderError(int paramInt)
    {
      super();
      this.err_no = paramInt;
    }
  }
}


/* Location:           C:\Users\Admin\Desktop\Decompiler\JAD\jd-gui-0.3.6.windows\classes_dex2jar.jar
 * Qualified Name:     com.dynamixsoftware.printershare.ActivityPrintPDF
 * JD-Core Version:    0.7.0.1
 */